package config;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import service.DeptService;

public class Main {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

        DeptService deptService = context.getBean(DeptService.class);
        System.out.println(deptService.getNameById(2));
    }
}
